package com.heima.apis.article;

import com.heima.apis.article.fallback.IArticleFallback;
import com.heima.model.article.dots.ApArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

//value指定在哪里对这个远程接口进行实现，fallback指定远程调用失败的逻辑
@FeignClient(value = "leadnews-article" , fallback = IArticleFallback.class) //一定要标注实现类微服务的名称
public interface IArticleClient {

    @PostMapping("/api/v1/article/save")
    public ResponseResult saveArticle(@RequestBody ApArticleDto apArticleDto);

}
